Skip to content
  • 0 Votes
    12 Posts
    1k Views
    ChabaC

    @SGaist

    My data is ready to append. So i append them directly. There are 10-100 QTextEdits. I append 100-200 line to each of QTextEdits. Lines have arround 300 characters. I have one vector of vectors source.

    By the way, i moved my data source to a different thread. Then emitted signals to append with BlockingQueuedConnection. Gui is responsive now. But its not smooth. I dont know using blockingqueuedconnection instead of queuedconnection is the right way but my gui is responsive while appending strings now.

  • 0 Votes
    15 Posts
    2k Views
    S

    A quick look on bcrypt's webpage tells me this is not a library, but a program. If you want to have it as a library, there is not support for this out of the box. You need to figure it out by yourself.

    The general instructions for building are to use make. (Usually, nmake is the equivalent on Windows.) I don't see any instructions for Windows on the webpage. You'll have to look through the README's, etc. to figure it out. cmake and qmake will not help as these will just generate makefiles and not compile anything. However, there is already a makefile, so you don't have to run cmake or qmake to create them.

  • 0 Votes
    1 Posts
    257 Views
    No one has replied
  • 0 Votes
    6 Posts
    780 Views
    SGaistS

    No it's not, you can see that with its constructors that take a QSqlDatabase parameter.

    No clear is not called, the destructor is.

    There's no need to create QSqlQuery objects on the heap.

  • 0 Votes
    2 Posts
    376 Views
    mrjjM

    Hi
    If the database table type is of type date, it wont like a string formatted as
    SunFeb2020 so you need to match the toString format to the one expceted by the DBMS.

  • QTNationaldex

    Unsolved Showcase
    2
    3 Votes
    2 Posts
    621 Views
    mrjjM

    Hi
    Thank you for sharing.
    I don't know anything about Pokemon but
    its cool you used gif so they are animated and the code looks clean and structured.

  • 0 Votes
    8 Posts
    2k Views
    SGaistS

    @RunThiner There's no need for such a loop. QSerialPort already provides an asynchronous API and if you really want to wait for data to be available, there's a blocking API for that as shown in the QSerialPort details.

  • 0 Votes
    5 Posts
    806 Views
    jsulmJ

    @rohit1729 You should read this first: https://doc.qt.io/qt-5/signalsandslots.html

    void panelB::mouseMoveEvent(QMouseEvent *eventMove) { QString txt; txt = QString("(X:%1,Y:%2)").arg(eventMove->pos().x()).arg(eventMove->pos().y()); emit coordinatesChanged(eventMove->pos().x(), eventMove->pos().y()); //qDebug() << txt; }

    coordinatesChanged would be the signal.

  • 0 Votes
    3 Posts
    1k Views
    D

    @Gojir4 thanks, I am trying that right now. I’ve added a 1s delay in my image grabbing thread. Let’s see. Fingers crossed!

  • 0 Votes
    37 Posts
    5k Views
    mrjjM

    Hi
    You can use
    https://doc.qt.io/qt-5/qgraphicsitem.html#qgraphicsitem_cast
    and try cast to your child type if it really is, you can then use its members.
    so check for NULL and note the docs saying " reimplement the type() function"

  • 0 Votes
    2 Posts
    665 Views
    M

    @magicstar I have the same problem. Have you find a solution ?

  • 0 Votes
    5 Posts
    579 Views
    JKSHJ

    @VRonin said in how to Improve visual and add efects to Qt c++ apps for desktop:

    P.S.

    and mi instalation folder size is 12gb

    Checking everything in the installer is never a good idea. only install the version that matches your compiler

    +1

    See the warning at the bottom of Page 2: https://1drv.ms/w/s!AnaQjhA33g0K0lkIZPVjfsWrcPSI ("Warning: Be sure to only select the build(s) that you want. If you simply tick the version number, you will select and install all available builds, which can take up many 10s of gigabytes! This is especially important on Windows.")

  • 0 Votes
    10 Posts
    2k Views
    O

    @jsulm You were right. I finally understood what you meant by getting the db at any time. Thank you very much for your help!

    This is my working code:

    #include "f1_system.h" #include <QtSql/qsqldatabase.h> #include <QtSql/qsqlquery.h> #include <QtSql/qsqlerror.h> #include <QtSql/qsqldriver.h> F1_System::F1_System(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); QSqlDatabase db = QSqlDatabase::addDatabase("QODBC", "dataB"); QString connectionString = "Driver={SQL Server};Server=DESKTOP-4K9MAS2\\SQLEXPRESS01;Database=Formula1_BD;Trusted_Connection=yes;"; db.setDatabaseName(connectionString); connect(ui.loginPushButton, SIGNAL(clicked()), this, SLOT(validateLogin())); } F1_System::~F1_System() { QSqlDatabase::database("dataB").close(); } void F1_System::validateLogin() { if (QSqlDatabase::database("dataB").open()) { QString selectUser("SELECT Username FROM Users WHERE Username = '" + ui.usernameInputField->text() + "' AND Userpassword = '" + ui.passwordInputField->text() + "';"); QSqlQuery qry(selectUser, QSqlDatabase::database("dataB")); if (qry.next()) ui.label->setText("Status: You are logged in!"); else ui.label->setText("Status: Wrong credentials!\nTry again!"); } else ui.label->setText("Failed to connect to the database!"); }
  • 0 Votes
    4 Posts
    2k Views
    Andy314A

    @Ovidiu_GCO
    {SQL Server Native Client 17.0 };
    What is with the blank in front of "}"

  • Do not draw a QTableView

    Unsolved General and Desktop
    3
    0 Votes
    3 Posts
    594 Views
    D

    @JonB This adds a new, blank row at the end of the table model. But you do not set that row to hold your component / text?
    How to do it? I did not correctly understand what this function does, so if it's not hard for you. You can suggest how to insert text in the first free cell

  • 0 Votes
    22 Posts
    15k Views
    A

    @Nico1564 said in How to draw on Image loaded in a QGraphicsView:

    Yeah i know that this work but i need to draw with fonctions. I successed to do that but I don't want to have the GraphicsView at the beginning of the program, and i want to add draws like an Ellipse (and the image) when i click on buttons.

    These lines could just as well happen inside a button click

    QGraphicsEllipseItem* testItem = new QGraphicsEllipseItem(20,30,120,70,0); m_pScene->addItem(testItem);

    In that case, you would create an ellipse every time you pressed that button.

    I don't quite understand the "I don't want to have the GraphicsView at the beginning of the program" - maybe you could elaborate on that.

  • 0 Votes
    5 Posts
    2k Views
    SGaistS

    Sounds rather like a job for libusb

  • 0 Votes
    7 Posts
    3k Views
    O

    @Lukadriel Hi, One year passed and still waiting for the proper example. Did they give any tips?

  • 0 Votes
    14 Posts
    3k Views
    O

    @kshegunov I see now, that answers my question. Thanks.